

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>Installation - LiterateCS</title>

	<link rel="icon" type="image/x-icon" href="images/favicon.ico">
    <link rel="stylesheet" href="bootstrap/css/readable/bootstrap.min.css" />
<link rel="stylesheet" href="font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="sidebar/sidebar.min.css" />
<link rel="stylesheet" href="css/book.min.css" />
<link rel="stylesheet" href="syntax-highlight/solarized-light.min.css" />
<link rel="stylesheet" href="mermaid/mermaid.css" />

</head>

<body>
    
    <nav class="navbar navbar-inverse navbar-fixed-top">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="#sidebar-toggle" id="sidebar-toggle">
					<span>
						<img src="images/favicon.ico" height="24" class="hidden-sm hidden-xs" />
						<i id="sidebar-toggle-icon" class="hidden-md hidden-lg hidden-xl fa fa-angle-double-right" aria-hidden="true"></i>
						LiterateCS
					</span>
				</a>
            </div>
            <div id="navbar" class="navbar-collapse collapse">
                <ul class="nav navbar-nav">
                    <li><a href="index.html"><i class="fa fa-home" aria-hidden="true"></i> Home</a></li>
					<li><a href="https://github.com/johtela/LiterateCS"><i class="fa fa-github" aria-hidden="true"></i> GitHub Repository</a></li>
                    <li><a href="https://www.nuget.org/packages/LiterateCS/"><i class="fa fa-download" aria-hidden="true"></i> Download</a></li>
                    <li><a href="License.html">License</a></li>
                </ul>
            </div>
        </div>
    </nav>

    <div class="container">
        <div class="row">
            <div id="sidebar" class="col-md-3 hidden-sm hidden-xs">
                
        <div class="panel panel-default">
            <div class="panel-heading">
                <h4>On This Page</h4>
            </div>
            <div id="header-menu" class="panel-body main-menu">
                <ul></ul>
            </div>
        </div>  
        <div class="panel panel-default">
            <div class="panel-heading">
                <h4>Table of Contents</h4>
            </div>
            <div class="panel-body main-menu">
                <ul>
	<li><a href="index.html">Home</a></li>
	<ul>
	</ul>
	<li><a href="Introduction.html">Introduction</a></li>
	<ul>
	</ul>
	<li><a href="LiterateCS/Options.html">Command Line Options</a></li>
	<ul>
	</ul>
	<li><a href="LiterateCS/Program.html">Main Program</a></li>
	<ul>
	</ul>
	<li><a href="LiterateCS/SplitPath.html">SplitPath Structure</a></li>
	<ul>
	</ul>
	<li><a href="LiterateCS/Weaver.html">Document Weaver</a></li>
	<ul>
	</ul>
	<li><a href="LiterateCS/MdWeaver.html">Markdown Weaver</a></li>
	<ul>
	</ul>
	<li><a href="LiterateCS/HtmlWeaver.html">HTML Weaver</a></li>
	<ul>
	</ul>
	<li><a href="LiterateCS/TocManager.html">TOC Manager</a></li>
	<ul>
	</ul>
	<li><a href="LiterateCS/BlockList.html">Source Blocks</a></li>
	<ul>
	</ul>
	<li><a href="LiterateCS/Macro.html">Macros</a></li>
	<ul>
	</ul>
	<li><a href="LiterateCS/BlockBuilder.html">Block Builder</a></li>
	<ul>
	</ul>
	<li><a href="LiterateCS/HtmlBlockBuilder.html">HTML Block Builder</a></li>
	<ul>
	</ul>
	<li><a href="LiterateCS/HtmlGenerator.html">HTML Generation</a></li>
	<ul>
	</ul>
	<li>Themes</li>
	<ul>
<ul>
	<li><a href="LiterateCS.Theme/DirHelpers.html">Directory Utilities</a></li>
	<ul>
	</ul>
	<li><a href="LiterateCS.Theme/Toc.html">Table of Contents Classes</a></li>
	<ul>
	</ul>
	<li><a href="LiterateCS.Theme/PageParams.html">Page Parameters</a></li>
	<ul>
	</ul>
	<li><a href="LiterateCS.Theme/Theme.html">Theme Base Class</a></li>
	<ul>
	</ul>
	<li><a href="LiterateCS.Theme/LiterateException.html">Reporting Errors</a></li>
	<ul>
	</ul>
</ul>
	</ul>
	<li><a href="FrontMatter.html">Front Matter</a></li>
	<ul>
	</ul>
	<li><a href="TableOfContents.html">Table of Contents File</a></li>
	<ul>
	</ul>
	<li><a href="TipsAndTricks.html">Tips &amp; Tricks</a></li>
	<ul>
	</ul>
	<li><a href="License.html">License</a></li>
	<ul>
	</ul>
	<li><a href="README.html">README</a></li>
	<ul>
	</ul>
	<li><a href="Installation.html" class="selected">Installation</a></li>
	<ul>
	</ul>
</ul>
            </div>
        </div>

            </div>
			<div id="contentarea" class="col-md-9 col-sm-12 col-sm-push-0 col-xs-12 col-xs-push-0">
				<ul class="pager">
	<li class="previous"><a href="README.html">Previous: README</a></li>
	<li class="next disabled"><a href="#">Next</a></li>
</ul>
				<div id="static-content" class="markdown">
					<h1 id="installation">Installation</h1>
<p>LiterateCS runs on top of the <a href="https://www.microsoft.com/net/download/dotnet-core/2.1#sdk-2.1.300">.NET Core 2.1</a>. It is distributed as a <a href="https://nuget.org">Nuget</a> package
and deployed as <a href="https://docs.microsoft.com/en-us/dotnet/core/tools/global-tools">.NET Core global tool</a>. This makes it easy to install, uninstall, and
update. The technology for distributing command line tools as Nuget packages is quite
new (it was introduced in .NET Core 2.1.3) but seems to work well in practice.</p>
<h2 id="prerequisites">Prerequisites</h2>
<p>Before installing LiterateCS, make sure that you have <strong>.NET Core SDK version 2.1.3 or
newer</strong> installed. If you don't have it already, you can dowload it from
<a href="https://www.microsoft.com/net/download/dotnet-core/2.1#sdk-2.1.300">here</a>.</p>
<h2 id="installing">Installing</h2>
<p>To install LiterateCS, open a command prompt (PowerShell or classic version) and
type:</p>
<pre><code>&gt; dotnet tool install -g literatecs
</code></pre>
<p>This downloads the tool from <a href="https://nuget.org">nuget.org</a> and installs it in the folder
<code>$HOME/.dotnet/tools/.store/literatecs</code> by default. It also creates an executable
into <code>$HOME/.dotnet/tools</code> that should be already in your search path.</p>
<p>To verify that LiterateCS is correctly installed you can type:</p>
<pre><code>&gt; literatecs --help
</code></pre>
<p>This should print the help screen showing the available command line options.</p>
<p>To see what other global tools you have installed, you can run:</p>
<pre><code>&gt; dotnet tool list -g
</code></pre>
<p>This shows you all the currently installed .NET core global tools.</p>
<p><strong>Note</strong>: Contrary to what the name &quot;global tools&quot; suggests, they are actually
user-specific. They are not visible to other users of the computer. This is
obvious when you know that the installation directory is under the home directory.</p>
<h2 id="uninstalling">Uninstalling</h2>
<p>Uninstallation is easy. Just type:</p>
<pre><code>&gt; dotnet tool uninstall -g literatecs
</code></pre>
<p>This removes all the files previously installed.</p>
<h2 id="updating">Updating</h2>
<p>Updating to a new version is also a simple matter:</p>
<pre><code>&gt; dotnet tool update -g literatecs
</code></pre>
<p>This checks for the newer version of the tool in <a href="https://nuget.org">Nuget</a> repository and if one is
found, downloads and installs it.</p>
<h2 id="installing-project-template">Installing Project Template</h2>
<p>Optionally, you can also install the <a href="https://github.com/johtela/LiterateCS.Templates">project template</a> for creating C# projects that
readily contain the metadata used by LiterateCS. To install the project template
use the following command:</p>
<pre><code>&gt; dotnet new -i LiterateCS.Templates.LiterateLib.CSharp
</code></pre>
<p>After that you can create a new literate project with:</p>
<pre><code>&gt; dotnet new literatelib
</code></pre>
<p>If you don't like the project template, you can uninstall with the <code>-u</code> option.</p>
<pre><code>&gt; dotnet new -u LiterateCS.Templates.LiterateLib.CSharp
</code></pre>

				</div>
				<ul class="pager">
	<li class="previous"><a href="README.html">Previous: README</a></li>
	<li class="next disabled"><a href="#">Next</a></li>
</ul>
			</div>
        </div>
    </div>
    
    <footer class="panel-footer text-center">
        <div align="center">Copyright © 2018 Tommi Johtela</div>
		<div align="right">
			<small>
				Documentation created with <a href="https://johtela.github.io/LiterateCS/">LiterateCS</a>.
			</small>
		</div>
    </footer>


    
    <script src="bootstrap/js/jquery.min.js"></script>
    <script src="bootstrap/js/bootstrap.min.js"></script>
    <script src="sidebar/sidebar.js"></script>
    <script src="syntax-highlight/syntax.js"></script>
    <script type="text/x-mathjax-config">
        MathJax.Hub.Config({
        extensions: ["jsMath2jax.js"]
        });
    </script>
    <script src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS_HTML'></script>
	<script src="mermaid/mermaid.min.js"></script>
	<script>mermaid.initialize({startOnLoad:true});</script>

</body>
</html>